var selindex = null;
var selobject = null;
function OverField(obj, index){if(selindex != index)obj.className = "shadowfield";}
function OutField(obj, index){if(selindex != index) obj.className = "nullfield";}
function SelectField(obj, index)
{
    var field = document.getElementsByName("gameform[field]");
    if(field != null)
    {
        var greybutton = document.getElementById("play_grey");
        if(greybutton!=null)
        {
            greybutton.style.display = 'none';
        }
        var playbutton = document.getElementById("playbutton");
        if(playbutton != null)
        {
            playbutton.style.display = '';
        }
        if(selobject != null)
        {
            selobject.className = "nullfield";
        }
        selindex = index;
        selobject = obj;
        field = field[0];
        field.value = index;
        obj.className = "showel";
    }
}